import { useDrop } from "react-dnd"
import QuickCodeRender from "../render"

const RcReplace = ({$schema})=>{
    console.log('sddddd',{$schema})
    const [{ isOver, isOverCurrent }, drop] = useDrop(
        () => ({
          accept:'111',
          drop(_item: unknown, monitor) {
            const didDrop = monitor.didDrop()
            if (didDrop) {
              return
            }
            console.log({_item})
            // setHasDropped(true)
            // setHasDroppedOnChild(didDrop)
          },
          collect: (monitor) => ({
            isOver: monitor.isOver(),
            isOverCurrent: monitor.isOver({ shallow: true }),
          }),
        }),
        [],
      )
  console.log("RcReplace",$schema)  
return <span ref={drop}>
    <QuickCodeRender schema={$schema}></QuickCodeRender>
    
    </span>
}
export default RcReplace